app.controller('userController',function ($scope,$location,userService) {

    $scope.login=function (userName,password) {
        userService.login(userName,password).success(
            function (res) {
                $scope.resultMap=res;
                if($scope.resultMap.status){
                    window.location.href='http://localhost:8080/yiqilaidati/src/main/webapp/Exercise.html?_ijt=80uc43qlr47qk79agff8neoevb';
                }else{
                    alert("用户信息不存在");
                }
            }
        );
    }


    $scope.checklogin=function (userName,password) {
        alert(userName+password);
    }
});